babl: respond to gcc warnings
authorØyvind Kolås <pippin@gimp.org>
Sat, 19 Aug 2017 00:44:30 +0000 (02:44 +0200)
committerØyvind Kolås <pippin@gimp.org>
Sat, 19 Aug 2017 00:44:40 +0000 (02:44 +0200)
babl/babl-conversion.c
babl/babl-fish.c
babl/babl-internal.h

index 9e45a5b348baf5642e1fb99c5438ba636248e840..c2b0c6b643ba6531cebb3ef9b2325e55f282d8d0 100644 (file)
@@ -29,8 +29,8 @@
 Babl *
 _conversion_new (const char    *name,
                  int            id,
-                 Babl          *source,
-                 Babl          *destination,
+                 const Babl    *source,
+                 const Babl    *destination,
                  BablFuncLinear linear,
                  BablFuncPlane  plane,
                  BablFuncPlanar planar,
index d8b7c7eceb70a07546572b79b2fdb2f181a969ef..4cc49247666fced855b1795c6d55a3f72eff1667 100644 (file)
@@ -129,7 +129,6 @@ babl_conversion_find (const void *source,
      const Babl *srgb_source = BABL (source)->model.data ? BABL (source)->model.data:source;
      const Babl *srgb_destination = BABL (destination)->model.data ? BABL (destination)->model.data:destination;
      Babl *reference = babl_conversion_find (srgb_source, srgb_destination);
-     BablConversion *ret;
 
   /* when conversions are sought between models, with non-sRGB chromaticities,
      we create the needed conversions from existing ones on the fly, and
@@ -141,7 +140,7 @@ babl_conversion_find (const void *source,
      switch (reference->instance.class_type)
      {
         case BABL_CONVERSION_LINEAR:
-          return _conversion_new ("", 0, source, destination,
+          return _conversion_new ("", 0, (void*)source, (void*)destination,
                             reference->conversion.function.linear,
                             NULL,
                             NULL,
index 2ac404af202dcf9574e43d6a34d44c2396e11ece..9181bd9224ca567c6b40ed3965fea08e15f55656 100644 (file)
@@ -326,8 +326,8 @@ babl_model_with_space (const char *name, const Babl *space);
 Babl *
 _conversion_new (const char    *name,
                  int            id,
-                 Babl          *source,
-                 Babl          *destination,
+                 const Babl    *source,
+                 const Babl    *destination,
                  BablFuncLinear linear,
                  BablFuncPlane  plane,
                  BablFuncPlanar planar,